package com.weng.bigdata.micro.service.warehouse.adapter.fallback;

import com.weng.bigdata.core.warehouse.model.dto.TableDto;
import com.weng.bigdata.micro.service.common.Constants;
import com.weng.bigdata.micro.service.warehouse.adapter.feign.WarehouseSchemaFeignService;
import com.weng.bigdata.micro.service.warehouse.adapter.model.req.AlterTableReq;
import com.weng.bigdata.micro.service.warehouse.adapter.model.req.CreateTableLikeReq;
import com.weng.framework.core.model.ResponseData;
import org.springframework.stereotype.Component;

/**
 * @author wengzhonghui
 * @date 2019/3/23 16:12
 */
@Component
public class WarehouseSchemaFallBack implements WarehouseSchemaFeignService {

		@Override
		public ResponseData createTables(TableDto tableSchema) {
				return ResponseData.failed(Constants.DEFAULT_FAIL_MSM);
		}

		@Override
		public ResponseData createTableOfLike(CreateTableLikeReq tableSchema) {
				return ResponseData.failed(Constants.DEFAULT_FAIL_MSM);
		}

		@Override
		public ResponseData changeTableName(AlterTableReq alterTableReq) {
				return ResponseData.failed(Constants.DEFAULT_FAIL_MSM);
		}

		@Override
		public ResponseData dropTables(String tableName) {
				return ResponseData.failed(Constants.DEFAULT_FAIL_MSM);
		}

		@Override
		public ResponseData getColumns(String tableName, String convertDbType) {
				return ResponseData.failed(Constants.DEFAULT_FAIL_MSM);
		}

		@Override
		public ResponseData checkTableIsExists(String tableName) {
				return ResponseData.failed(Constants.DEFAULT_FAIL_MSM);
		}
}
